// 获取文件类型
export function getFileType(filePath) {
  var index = filePath.lastIndexOf('.')
  if (index === -1) {
    return ''
  } else {
    var ext = filePath.substr(index + 1)
    return ext;
  }
}

export function getFileName(filePath) {
  var name
  var index = filePath.lastIndexOf('.')
  if (index === -1) {
    name = filePath
  } else {
    name = filePath.substr(0, index)
  }
  return name;
}
